/*
 *  POJ2586: Y2K Accounting Bug
 */

/*-------- Includes --------*/
#include <stdio.h>
#include <stdlib.h>

/*-------- Main Function --------*/
int main(int argc, char const *argv[])
{
    int s, d;

    while (scanf("%d %d\n", &s, &d) != EOF) {
        int surplus;
        if      (4 * s < d)     surplus = 10 * s - 2 * d;
        else if (3 * s < 2 * d) surplus = 8 * s - 4 * d;
        else if (2 * s < 3 * d) surplus = 6 * s - 6 * d;
        else if (s < 4 * d)     surplus = 3 * s - 9 * d;
        else                    surplus = -1;

        if (surplus < 0)
            printf("Deficit\n");
        else
            printf("%d\n", surplus);
    }

    return 0;
}
